/**
 * 
 */
package se.cirrus.base.struct;

import se.cirrus.base.com.BasicIPMessage;

/**
 * @author Winquman
 *
 */
public class ChatContent extends Content {

	private String name;
	private String message;
	public final int type;
	
	/**
	 * @param serializedContent
	 */
	public ChatContent(String serializedContent) {
		String ss[] = serializedContent.split("|");
		name = ss[0];
		message = ss[1];
		type = BasicIPMessage.TYPE_CONTENT_CHAT;
	}
	
	
	public ChatContent(String name, String message) {
		this.name = name;
		this.message = message;
		type = BasicIPMessage.TYPE_CONTENT_CHAT;
	}

	public String toString() {
		return "[" + timestamp + "]" + name + "@" + sourceID + ">" + message;
	}
}
